A data file encoded based on H.264 includes a plurality of picture slices forming a picture included in a sequence, a sequence parameter set (SPS) including information on encoding of the entire sequence, and a picture parameter set (PPS) including information on encoding of the entire picture. The sequence corresponds to the entire compressed moving image. The picture is one screen forming the sequence. A unit of a predetermined number of picture slices, based on which a picture can be decoded independently of another picture slice is called a random access unit (RAU). The RAU may include the SPS and/or PPS. The concept of an RAU in H.264 is similar to that of group of pictures (GOP) in MPEG-2.
When these types of data files are played back, a plurality of picture slices included in the RAU need to be decoded based on the SPS and PPS. If the encoding method is MPEG-2, a sequence can be played back from the middle without complicated processing by decoding the GOP because all information necessary for decoding is included in a GOP header.
However, if the encoding method is H.264, the SPS and PPS are not always the first and second data units in an RAU to be read. For example, if an RAU to be read is not the first RAU in a sequence, the SPS and PPS necessary for decoding the RAU may not be in the RAU to be read, but may be the first and second data units in the first RAU in the sequence. To play back such a sequence from the middle, it is necessary to first send to a decoder the SPS and PPS, which are the first and second data units in the first RAU in the sequence, and then send to the decoder the picture slices included in the RAU to be read. Further, the SPS and PPS may be in an RAU in the middle of a sequence, which is not the RAU to be read. In such a case, the SPS and PPS for decoding the picture slices included in the RAU to be read need to be searched for in the sequence. As a result of that, complicated processing is required.